<!DOCTYPE html>
<html lang="en">
    <head>
        <meta charset="UTF-8" />
        <meta http-equiv="X-UA-Compatible" content="IE=edge" />
        <meta name="viewport" content="width=device-width, initial-scale=1.0" />
        <title>Document</title>
    </head>
    <body>
        
        <script>
            setTimeout(() => {
                new Promise((res) => {
                    console.log('pp1');
                    res();
                }).then(() => {
                    console.log('tt1');
                });
                console.log('1111');

                setTimeout(() => {
                    console.log(99);
                });

                new Promise((res) => {
                    console.log('pp2');
                    res();
                }).then(() => {
                    console.log('tt2');
                });
            }, 1000);

            Promise.resolve(3).then((res) => {
                console.log(res);
            });

            requestAnimationFrame(() => {
                console.log(2);
            });
        </script>
    </body>
</html>
